<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>我的电商系统</title>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/bootstrap-theme.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/fornt.css">
</head>
<body id="login">

	<div class="container"> 
		<div class="col-md-3 nav-left">
			<a href="<?php echo site_url();?>"><img id="logo"  src="<?php echo base_url();?>public/img/logo.jpg" /></a>
		</div>
	</div>
	<div class="row logins">
		<div class="container">
			<div class="col-md-6">
			</div>
			<div class="col-md-5 user_login">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 style="margin-left:45px" class="panel-title">欢迎登陆</h3>
					</div>
					<div class="panel-body">
						<form class="form-horizontal" action="" method="POST">
							<div class="form-group">
								<label class="col-sm-2 control-label">用户名：</label>
								<div class="col-sm-8">
									<input type="text" name="username" value="<?php echo set_value('username'); ?>" class="form-control" placeholder="手机号/帐户">
									<?php echo form_error('username'); ?>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">密　码：</label>
								<div class="col-sm-8">
									<input type="password" name="password" value="<?php echo set_value('password'); ?>" class="form-control" placeholder="密码">
									<?php echo form_error('password'); ?>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">验证码：</label>
								<div class="col-sm-4">
									<input type="text" name="verify"  class="form-control" placeholder="验证码">
									<?php echo form_error('verify'); ?>
								</div>
								<!-- 验证码的生成 -->
								<div class="col-md-5">
									<img id="verify" style="border:1px solid green" src="<?php echo site_url('User_login/verify')?>" />
									<span id="no_view" style="cursor: pointer;">看不清，换一张</span>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-8">
									<button type="submit" class="btn btn-success">登陆</button>   
									<a  style="margin-left:10px;" href="<?php echo site_url('User_login/regedit')?>">没有帐户？请注册</a>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>	
</body>
	<script type="text/javascript" src="<?php echo base_url();?>public/js/jquery.js"></script>
	<script type="text/javascript">
		$(function(){
			//鼠标点击验证码，生成的图片会刷新，为了防止图片的地址一样，需要增加随机数，从热防止浏览器会缓存图片地址
			$('#no_view').click(function(){
				var src="<?php echo site_url('User_login/verify')?>"+'?'+Math.random();
				$('#verify').attr('src',src);
			})
		})
	</script>
</html>